package com.designmodel.atcion.visit;

/**
 * 访问者模式
 *
 * @author think
 * @version 1.0.0
 * @since 2020/4/22
 */
public class Test {

    public static void main(String[] args) {

        Visitor visitor = new MyVisitorOne();
        Subject sub = new MySubjectOne();
        sub.accept(visitor);

        visitor = new MyVisitorTwo();
        sub = new MySubjectTwo();
        sub.accept(visitor);
    }
}
